

import java.awt.Color;
import java.io.Serializable;

import javax.swing.JFrame;

public class Culori extends JFrame implements Serializable{
	private String culoare="black";
	private int width=500;
	private int height=500;
	
	public String getCuloare(){
		return culoare;
	}
	
	public void setCuloare(String culoare){
		String old=this.culoare;
		this.culoare=culoare;
		if(culoare=="black")
			setBackground(Color.black);
		if(culoare=="white")
			setBackground(Color.white);
		if(culoare=="green")
			setBackground(Color.green);
		if(culoare=="blue")
			setBackground(Color.blue);
		if(culoare=="yellow")
			setBackground(Color.yellow);
		if(culoare=="red")
			setBackground(Color.red);
			
	}
	
	public Culori(){
		setSize(width,height);
		if(culoare=="black")
			setBackground(Color.black);
		if(culoare=="white")
			setBackground(Color.white);
		if(culoare=="green")
			setBackground(Color.green);
		if(culoare=="blue")
			setBackground(Color.blue);
		if(culoare=="yellow")
			setBackground(Color.yellow);
		if(culoare=="red")
			setBackground(Color.red);
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		int old=this.height;
		this.height = height;
		setSize(width,height);
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		int old=this.width;
		this.width = width;
		setSize(width,height);
	}
}
